package com.ivan.client.controller;

import com.ivan.common.bean.entity.User;
import com.ivan.common.util.IvanTool;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Ivan
 * @Title: UserController
 * @date 2021/7/816:21
 */
@RestController
@RequestMapping("/client")
public class UserController {

    @GetMapping("/users")
    public List<User> users() {
        List<User> users = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            users.add(new User(IvanTool.id(), "user" + i, 20 + i));
        }
        return users;
    }
}
